(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0) → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0) → 0
shorter(nil, y) → true
shorter(cons(x, l), 0) → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0), shorter(l, s(0)), l)
if(true, b, l) → s(0)
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

Rewrite Strategy: FULL

(1) DecreasingLoopProof (EQUIVALENT transformation)

The following loop(s) give(s) rise to the lower bound Ω(n1):
The rewrite sequence
plus(s(x154_1), y) →+ s(plus(x154_1, y))
gives rise to a decreasing loop by considering the right hand sides subterm at position [0].
The pumping substitution is [x154_1 / s(x154_1)].
The result substitution is [ ].

(2) BOUNDS(n^1, INF)

(3) RenamingProof (EQUIVALENT transformation)

Renamed function symbols to avoid clashes with predefined symbol.

(4) Obligation:

Runtime Complexity Relative TRS:
The TRS R consists of the following rules:

car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0') → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0'
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0') → 0'
shorter(nil, y) → true
shorter(cons(x, l), 0') → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0'), shorter(l, s(0')), l)
if(true, b, l) → s(0')
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

S is empty.
Rewrite Strategy: FULL

(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)

Infered types.

(6) Obligation:

TRS:
Rules:
car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0') → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0'
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0') → 0'
shorter(nil, y) → true
shorter(cons(x, l), 0') → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0'), shorter(l, s(0')), l)
if(true, b, l) → s(0')
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

Types:
car :: cons:nil → 0':s
cons :: 0':s → cons:nil → cons:nil
cddr :: cons:nil → cons:nil
nil :: cons:nil
cadr :: cons:nil → 0':s
isZero :: 0':s → true:false
0' :: 0':s
true :: true:false
s :: 0':s → 0':s
false :: true:false
plus :: 0':s → 0':s → 0':s
ifplus :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
times :: 0':s → 0':s → 0':s
iftimes :: true:false → 0':s → 0':s → 0':s
shorter :: cons:nil → 0':s → true:false
prod :: cons:nil → 0':s
if :: true:false → true:false → cons:nil → 0':s
if2 :: true:false → cons:nil → 0':s
hole_0':s1_0 :: 0':s
hole_cons:nil2_0 :: cons:nil
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil

(7) OrderProof (LOWER BOUND(ID) transformation)

Heuristically decided to analyse the following defined symbols:
plus, times, shorter, prod

They will be analysed ascendingly in the following order:
plus < times
times < prod
shorter < prod

(8) Obligation:

TRS:
Rules:
car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0') → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0'
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0') → 0'
shorter(nil, y) → true
shorter(cons(x, l), 0') → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0'), shorter(l, s(0')), l)
if(true, b, l) → s(0')
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

Types:
car :: cons:nil → 0':s
cons :: 0':s → cons:nil → cons:nil
cddr :: cons:nil → cons:nil
nil :: cons:nil
cadr :: cons:nil → 0':s
isZero :: 0':s → true:false
0' :: 0':s
true :: true:false
s :: 0':s → 0':s
false :: true:false
plus :: 0':s → 0':s → 0':s
ifplus :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
times :: 0':s → 0':s → 0':s
iftimes :: true:false → 0':s → 0':s → 0':s
shorter :: cons:nil → 0':s → true:false
prod :: cons:nil → 0':s
if :: true:false → true:false → cons:nil → 0':s
if2 :: true:false → cons:nil → 0':s
hole_0':s1_0 :: 0':s
hole_cons:nil2_0 :: cons:nil
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))

The following defined symbols remain to be analysed:
plus, times, shorter, prod

They will be analysed ascendingly in the following order:
plus < times
times < prod
shorter < prod

(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)

Induction Base:
plus(gen_0':s4_0(0), gen_0':s4_0(b)) →RΩ(1)
ifplus(isZero(gen_0':s4_0(0)), gen_0':s4_0(0), gen_0':s4_0(b)) →RΩ(1)
ifplus(true, gen_0':s4_0(0), gen_0':s4_0(b)) →RΩ(1)
gen_0':s4_0(b)

Induction Step:
plus(gen_0':s4_0(+(n7_0, 1)), gen_0':s4_0(b)) →RΩ(1)
ifplus(isZero(gen_0':s4_0(+(n7_0, 1))), gen_0':s4_0(+(n7_0, 1)), gen_0':s4_0(b)) →RΩ(1)
ifplus(false, gen_0':s4_0(+(1, n7_0)), gen_0':s4_0(b)) →RΩ(1)
s(plus(p(gen_0':s4_0(+(1, n7_0))), gen_0':s4_0(b))) →RΩ(1)
s(plus(gen_0':s4_0(n7_0), gen_0':s4_0(b))) →IH
s(gen_0':s4_0(+(b, c8_0)))

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(10) Complex Obligation (BEST)

(11) Obligation:

TRS:
Rules:
car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0') → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0'
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0') → 0'
shorter(nil, y) → true
shorter(cons(x, l), 0') → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0'), shorter(l, s(0')), l)
if(true, b, l) → s(0')
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

Types:
car :: cons:nil → 0':s
cons :: 0':s → cons:nil → cons:nil
cddr :: cons:nil → cons:nil
nil :: cons:nil
cadr :: cons:nil → 0':s
isZero :: 0':s → true:false
0' :: 0':s
true :: true:false
s :: 0':s → 0':s
false :: true:false
plus :: 0':s → 0':s → 0':s
ifplus :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
times :: 0':s → 0':s → 0':s
iftimes :: true:false → 0':s → 0':s → 0':s
shorter :: cons:nil → 0':s → true:false
prod :: cons:nil → 0':s
if :: true:false → true:false → cons:nil → 0':s
if2 :: true:false → cons:nil → 0':s
hole_0':s1_0 :: 0':s
hole_cons:nil2_0 :: cons:nil
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil

Lemmas:
plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))

The following defined symbols remain to be analysed:
times, shorter, prod

They will be analysed ascendingly in the following order:
times < prod
shorter < prod

(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
times(gen_0':s4_0(n1134_0), gen_0':s4_0(b)) → gen_0':s4_0(*(n1134_0, b)), rt ∈ Ω(1 + b·n11340 + n11340)

Induction Base:
times(gen_0':s4_0(0), gen_0':s4_0(b)) →RΩ(1)
iftimes(isZero(gen_0':s4_0(0)), gen_0':s4_0(0), gen_0':s4_0(b)) →RΩ(1)
iftimes(true, gen_0':s4_0(0), gen_0':s4_0(b)) →RΩ(1)
0'

Induction Step:
times(gen_0':s4_0(+(n1134_0, 1)), gen_0':s4_0(b)) →RΩ(1)
iftimes(isZero(gen_0':s4_0(+(n1134_0, 1))), gen_0':s4_0(+(n1134_0, 1)), gen_0':s4_0(b)) →RΩ(1)
iftimes(false, gen_0':s4_0(+(1, n1134_0)), gen_0':s4_0(b)) →RΩ(1)
plus(gen_0':s4_0(b), times(p(gen_0':s4_0(+(1, n1134_0))), gen_0':s4_0(b))) →RΩ(1)
plus(gen_0':s4_0(b), times(gen_0':s4_0(n1134_0), gen_0':s4_0(b))) →IH
plus(gen_0':s4_0(b), gen_0':s4_0(*(c1135_0, b))) →LΩ(1 + b)
gen_0':s4_0(+(b, *(n1134_0, b)))

We have rt ∈ Ω(n2) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n2).

(13) Complex Obligation (BEST)

(14) Obligation:

TRS:
Rules:
car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0') → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0'
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0') → 0'
shorter(nil, y) → true
shorter(cons(x, l), 0') → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0'), shorter(l, s(0')), l)
if(true, b, l) → s(0')
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

Types:
car :: cons:nil → 0':s
cons :: 0':s → cons:nil → cons:nil
cddr :: cons:nil → cons:nil
nil :: cons:nil
cadr :: cons:nil → 0':s
isZero :: 0':s → true:false
0' :: 0':s
true :: true:false
s :: 0':s → 0':s
false :: true:false
plus :: 0':s → 0':s → 0':s
ifplus :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
times :: 0':s → 0':s → 0':s
iftimes :: true:false → 0':s → 0':s → 0':s
shorter :: cons:nil → 0':s → true:false
prod :: cons:nil → 0':s
if :: true:false → true:false → cons:nil → 0':s
if2 :: true:false → cons:nil → 0':s
hole_0':s1_0 :: 0':s
hole_cons:nil2_0 :: cons:nil
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil

Lemmas:
plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
times(gen_0':s4_0(n1134_0), gen_0':s4_0(b)) → gen_0':s4_0(*(n1134_0, b)), rt ∈ Ω(1 + b·n11340 + n11340)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))

The following defined symbols remain to be analysed:
shorter, prod

They will be analysed ascendingly in the following order:
shorter < prod

(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)

Proved the following rewrite lemma:
shorter(gen_cons:nil5_0(n2790_0), gen_0':s4_0(n2790_0)) → true, rt ∈ Ω(1 + n27900)

Induction Base:
shorter(gen_cons:nil5_0(0), gen_0':s4_0(0)) →RΩ(1)
true

Induction Step:
shorter(gen_cons:nil5_0(+(n2790_0, 1)), gen_0':s4_0(+(n2790_0, 1))) →RΩ(1)
shorter(gen_cons:nil5_0(n2790_0), gen_0':s4_0(n2790_0)) →IH
true

We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).

(16) Complex Obligation (BEST)

(17) Obligation:

TRS:
Rules:
car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0') → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0'
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0') → 0'
shorter(nil, y) → true
shorter(cons(x, l), 0') → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0'), shorter(l, s(0')), l)
if(true, b, l) → s(0')
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

Types:
car :: cons:nil → 0':s
cons :: 0':s → cons:nil → cons:nil
cddr :: cons:nil → cons:nil
nil :: cons:nil
cadr :: cons:nil → 0':s
isZero :: 0':s → true:false
0' :: 0':s
true :: true:false
s :: 0':s → 0':s
false :: true:false
plus :: 0':s → 0':s → 0':s
ifplus :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
times :: 0':s → 0':s → 0':s
iftimes :: true:false → 0':s → 0':s → 0':s
shorter :: cons:nil → 0':s → true:false
prod :: cons:nil → 0':s
if :: true:false → true:false → cons:nil → 0':s
if2 :: true:false → cons:nil → 0':s
hole_0':s1_0 :: 0':s
hole_cons:nil2_0 :: cons:nil
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil

Lemmas:
plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
times(gen_0':s4_0(n1134_0), gen_0':s4_0(b)) → gen_0':s4_0(*(n1134_0, b)), rt ∈ Ω(1 + b·n11340 + n11340)
shorter(gen_cons:nil5_0(n2790_0), gen_0':s4_0(n2790_0)) → true, rt ∈ Ω(1 + n27900)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))

The following defined symbols remain to be analysed:
prod

(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)

Could not prove a rewrite lemma for the defined symbol prod.

(19) Obligation:

TRS:
Rules:
car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0') → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0'
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0') → 0'
shorter(nil, y) → true
shorter(cons(x, l), 0') → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0'), shorter(l, s(0')), l)
if(true, b, l) → s(0')
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

Types:
car :: cons:nil → 0':s
cons :: 0':s → cons:nil → cons:nil
cddr :: cons:nil → cons:nil
nil :: cons:nil
cadr :: cons:nil → 0':s
isZero :: 0':s → true:false
0' :: 0':s
true :: true:false
s :: 0':s → 0':s
false :: true:false
plus :: 0':s → 0':s → 0':s
ifplus :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
times :: 0':s → 0':s → 0':s
iftimes :: true:false → 0':s → 0':s → 0':s
shorter :: cons:nil → 0':s → true:false
prod :: cons:nil → 0':s
if :: true:false → true:false → cons:nil → 0':s
if2 :: true:false → cons:nil → 0':s
hole_0':s1_0 :: 0':s
hole_cons:nil2_0 :: cons:nil
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil

Lemmas:
plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
times(gen_0':s4_0(n1134_0), gen_0':s4_0(b)) → gen_0':s4_0(*(n1134_0, b)), rt ∈ Ω(1 + b·n11340 + n11340)
shorter(gen_cons:nil5_0(n2790_0), gen_0':s4_0(n2790_0)) → true, rt ∈ Ω(1 + n27900)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))

No more defined symbols left to analyse.

(20) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n2) was proven with the following lemma:
times(gen_0':s4_0(n1134_0), gen_0':s4_0(b)) → gen_0':s4_0(*(n1134_0, b)), rt ∈ Ω(1 + b·n11340 + n11340)

(21) BOUNDS(n^2, INF)

(22) Obligation:

TRS:
Rules:
car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0') → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0'
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0') → 0'
shorter(nil, y) → true
shorter(cons(x, l), 0') → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0'), shorter(l, s(0')), l)
if(true, b, l) → s(0')
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

Types:
car :: cons:nil → 0':s
cons :: 0':s → cons:nil → cons:nil
cddr :: cons:nil → cons:nil
nil :: cons:nil
cadr :: cons:nil → 0':s
isZero :: 0':s → true:false
0' :: 0':s
true :: true:false
s :: 0':s → 0':s
false :: true:false
plus :: 0':s → 0':s → 0':s
ifplus :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
times :: 0':s → 0':s → 0':s
iftimes :: true:false → 0':s → 0':s → 0':s
shorter :: cons:nil → 0':s → true:false
prod :: cons:nil → 0':s
if :: true:false → true:false → cons:nil → 0':s
if2 :: true:false → cons:nil → 0':s
hole_0':s1_0 :: 0':s
hole_cons:nil2_0 :: cons:nil
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil

Lemmas:
plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
times(gen_0':s4_0(n1134_0), gen_0':s4_0(b)) → gen_0':s4_0(*(n1134_0, b)), rt ∈ Ω(1 + b·n11340 + n11340)
shorter(gen_cons:nil5_0(n2790_0), gen_0':s4_0(n2790_0)) → true, rt ∈ Ω(1 + n27900)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))

No more defined symbols left to analyse.

(23) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n2) was proven with the following lemma:
times(gen_0':s4_0(n1134_0), gen_0':s4_0(b)) → gen_0':s4_0(*(n1134_0, b)), rt ∈ Ω(1 + b·n11340 + n11340)

(24) BOUNDS(n^2, INF)

(25) Obligation:

TRS:
Rules:
car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0') → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0'
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0') → 0'
shorter(nil, y) → true
shorter(cons(x, l), 0') → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0'), shorter(l, s(0')), l)
if(true, b, l) → s(0')
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

Types:
car :: cons:nil → 0':s
cons :: 0':s → cons:nil → cons:nil
cddr :: cons:nil → cons:nil
nil :: cons:nil
cadr :: cons:nil → 0':s
isZero :: 0':s → true:false
0' :: 0':s
true :: true:false
s :: 0':s → 0':s
false :: true:false
plus :: 0':s → 0':s → 0':s
ifplus :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
times :: 0':s → 0':s → 0':s
iftimes :: true:false → 0':s → 0':s → 0':s
shorter :: cons:nil → 0':s → true:false
prod :: cons:nil → 0':s
if :: true:false → true:false → cons:nil → 0':s
if2 :: true:false → cons:nil → 0':s
hole_0':s1_0 :: 0':s
hole_cons:nil2_0 :: cons:nil
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil

Lemmas:
plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)
times(gen_0':s4_0(n1134_0), gen_0':s4_0(b)) → gen_0':s4_0(*(n1134_0, b)), rt ∈ Ω(1 + b·n11340 + n11340)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))

No more defined symbols left to analyse.

(26) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n2) was proven with the following lemma:
times(gen_0':s4_0(n1134_0), gen_0':s4_0(b)) → gen_0':s4_0(*(n1134_0, b)), rt ∈ Ω(1 + b·n11340 + n11340)

(27) BOUNDS(n^2, INF)

(28) Obligation:

TRS:
Rules:
car(cons(x, l)) → x
cddr(nil) → nil
cddr(cons(x, nil)) → nil
cddr(cons(x, cons(y, l))) → l
cadr(cons(x, cons(y, l))) → y
isZero(0') → true
isZero(s(x)) → false
plus(x, y) → ifplus(isZero(x), x, y)
ifplus(true, x, y) → y
ifplus(false, x, y) → s(plus(p(x), y))
times(x, y) → iftimes(isZero(x), x, y)
iftimes(true, x, y) → 0'
iftimes(false, x, y) → plus(y, times(p(x), y))
p(s(x)) → x
p(0') → 0'
shorter(nil, y) → true
shorter(cons(x, l), 0') → false
shorter(cons(x, l), s(y)) → shorter(l, y)
prod(l) → if(shorter(l, 0'), shorter(l, s(0')), l)
if(true, b, l) → s(0')
if(false, b, l) → if2(b, l)
if2(true, l) → car(l)
if2(false, l) → prod(cons(times(car(l), cadr(l)), cddr(l)))

Types:
car :: cons:nil → 0':s
cons :: 0':s → cons:nil → cons:nil
cddr :: cons:nil → cons:nil
nil :: cons:nil
cadr :: cons:nil → 0':s
isZero :: 0':s → true:false
0' :: 0':s
true :: true:false
s :: 0':s → 0':s
false :: true:false
plus :: 0':s → 0':s → 0':s
ifplus :: true:false → 0':s → 0':s → 0':s
p :: 0':s → 0':s
times :: 0':s → 0':s → 0':s
iftimes :: true:false → 0':s → 0':s → 0':s
shorter :: cons:nil → 0':s → true:false
prod :: cons:nil → 0':s
if :: true:false → true:false → cons:nil → 0':s
if2 :: true:false → cons:nil → 0':s
hole_0':s1_0 :: 0':s
hole_cons:nil2_0 :: cons:nil
hole_true:false3_0 :: true:false
gen_0':s4_0 :: Nat → 0':s
gen_cons:nil5_0 :: Nat → cons:nil

Lemmas:
plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)

Generator Equations:
gen_0':s4_0(0) ⇔ 0'
gen_0':s4_0(+(x, 1)) ⇔ s(gen_0':s4_0(x))
gen_cons:nil5_0(0) ⇔ nil
gen_cons:nil5_0(+(x, 1)) ⇔ cons(0', gen_cons:nil5_0(x))

No more defined symbols left to analyse.

(29) LowerBoundsProof (EQUIVALENT transformation)

The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s4_0(n7_0), gen_0':s4_0(b)) → gen_0':s4_0(+(n7_0, b)), rt ∈ Ω(1 + n70)

(30) BOUNDS(n^1, INF)